import request from '@/utils/request';

export async function downloadExcelImportTemplateApi(serial) {
  var resp = await request({
    url: '/common/download_import_template/' + serial + '/',
    method: 'get'
  });
  return resp;
}

export async function getUserList(username) {
  var resp = await request({
    url: '/common/getuserlist/' + username + '/',
    method: 'get'
  });
  return resp;
}

export async function getAllUserList() {
  var resp = await request({
    url: '/common/getuserlist/',
    method: 'get'
  });
  return resp;
}

export async function getDropDownRoleListApi() {
  var resp = await request({
    url: '/common/dropdown/role/',
    method: 'get'
  });
  return resp;
}

export async function getDropDownMenuListApi() {
  var resp = await request({
    url: '/common/dropdown/menu/',
    method: 'get'
  });
  return resp;
}

export async function getDropDownCodeTableListApi(params) {
  var resp = await request({
    url: '/common/dropdown/code_table/',
    method: 'get',
    params
  });
  return resp;
}
// Code Table API
export function getCodeTableDetailApi(model, field) {
  return request({
    url: `/codetable/bs/inquire/${model}/${field}`,
    method: 'get'
  })
}
